//
//  WssDeleEngine.swift
//  onemeetingmac
//
//  Created by 张衡 on 2020/5/29.
//  Copyright © 2020 onemeeting. All rights reserved.
//

import Foundation

class WssDeleEngine: NSObject {
    static let shared = WssDeleEngine()
}

extension WssDeleEngine:WebSocketDelegate {
    func websocketDidConnect(socket: WebSocketClient) {
        
    }
    
    func websocketDidDisconnect(socket: WebSocketClient, error: Error?) {
        
    }
    
    func websocketDidReceiveMessage(socket: WebSocketClient, text: String) {
        guard let mode = WebSocketMode.deserialize(from: text.toDict()) else {
            return
        }
        
        switch mode.cmd {
        case 101:
            break
        default:
            break
        }
    }
    
    func websocketDidReceiveData(socket: WebSocketClient, data: Data) {
        
    }
}
